﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="GreatB2C.Web.Manage.Index" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="copyright" content="<% Response.Write( GreatB2C.Config.SiteInfo.UIConfig.Copyright ); %>" />
    <meta name="keywords" content="<% Response.Write( GreatB2C.Config.SiteInfo.UIConfig.SiteMeta ); %>" />
    <meta name="description" content="<% Response.Write( GreatB2C.Config.SiteInfo.UIConfig.MetaDescription ); %>" />
    <title>
        <% Response.Write( GreatB2C.Config.SiteInfo.UIConfig.SiteName ); %>
    </title>
    
    <link href="../App_Themes/AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
    <link href="../App_Themes/AdminDefaultTheme/xtree.css" type="text/css" rel="stylesheet" />
    <link href="../App_Themes/AdminDefaultTheme/MasterPage.css" type="text/css" rel="stylesheet" />
    <link href="../App_Themes/AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" src="../Resource/Script/jquery-1.4.2.min.js"></script>

</head>

<script language="javascript" src="/Manage/JS/AdminIndex.js" type="text/javascript"></script>

<script language="javascript" src="/Manage/JS/FrameTab.js" type="text/javascript"></script>

<script language="javascript" type="text/javascript">
    setStyleSheetPath("/App_Themes/AdminDefaultTheme/");
    setBasePath("/", "Admin");
    setAdminName("Admin");

    function onload() {
        var width = document.body.clientWidth - 207;
        var lHeight = document.body.clientHeight - 78;
        var rHeight = lHeight - ($("#FrameTabs").height() || 0);
        document.getElementById("main_right").style.width = width > 0 ? width : 0;
        document.getElementById("main_right").style.height = rHeight > 0 ? rHeight : 0;
        document.getElementById("left").style.height = lHeight > 0 ? lHeight : 0;
        $("#FrameTabs").width(width);
        if (CheckFramesScroll) { CheckFramesScroll(); }
    }
    window.onresize = onload;
    
    function show(id) {
        var obj;
        obj = document.getElementById('PopMenu_' + id); obj.style.visibility = "visible";
    }
    function hide(id) {
        var obj;
        obj = document.getElementById('PopMenu_' + id); obj.style.visibility = "hidden";
    }
    function hideOthers(id) {
        var divs;
        if (document.all) {
            divs = document.all.tags('DIV');
        }
        else {
            divs = document.getElementsByTagName("DIV");
        }

        for (var i = 0; i < divs.length; i++) {
            if (divs[i].id != 'PopMenu_' + id && divs[i].id.indexOf('PopMenu_') >= 0) {
                divs[i].style.visibility = "hidden";
            }
        }
    }
</script>

<body id="Indexbody" onload="onload();">
    <form name="myform" method="post" action="index.aspx" id="myform" runat="server">
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="5">
                <div id="content">
                    <asp:Literal ID="litNavi" runat="server"></asp:Literal>
                    <div id="Announce">
                        <a href="/" target="_blank" title="网站首页">
                            <img src="/Manage/Images/Home.gif" width="37" height="14" border="0" alt="网站首页" /></a>&nbsp;<a
                                href="#" onclick="javascript:gouser();" title="进入自己的会员中心"><img src="/Manage/Images/User.gif"
                                    width="37" height="14" border="0" alt="进入自己的会员中心" /></a>&nbsp;<a href="javascript:ShowMain('Profile/MyMessageManageGuide.aspx','Profile/MyMessageManage.aspx')"
                                        title="我的短消息"><img src="/Manage/Images/msg.gif" width="37" height="14" border="0"
                                            alt="我的短消息" /></a>&nbsp;<a id="OpenMemorandum" href="javascript:" title="打开备忘录"><img
                                                src="/Manage/Images/memorandum.gif" width="37" height="14" border="0" alt="备忘录" /></a><img src="/Manage/Images/Help.gif"
                                                        width="37" height="14" border="0" alt="帮助" /></a>&nbsp;<a href="Logout.aspx" onclick="javascript:return confirm('确定要退出吗?');"
                                                            title="安全退出"><img src="/Manage/Images/Exit.gif" width="37" height="14" border="0"
                                                                alt="安全退出" /></a></div>
                </div>
            </td>
        </tr>
        <tr style="vertical-align: top;">
            <td id="frmTitle">
                <iframe tabid="1" frameborder="0" id="left" name="left" scrolling="auto" src="Profile/QuickLinks.aspx"
                    style="width: 195px; height: 800px; visibility: inherit; z-index: 2; position: relative">
                </iframe>
            </td>
            <td onclick="switchSysBar();" class="but">
                <img id="switchPoint" src="/App_Themes/AdminDefaultTheme/images/butClose.gif" alt="关闭左栏"
                    style="border: 0px; width: 12px;" />
            </td>
            <td>
                <!-- 书签浏览 -->
                <div id="FrameTabs" style="overflow: hidden;">
                    <div class="tab-right" onmouseover="this.className='tab-right tab-right-over'" onmouseout="this.className='tab-right tab-right-disabled'">
                    </div>
                    <div class="tab-left" onmouseover="this.className='tab-left tab-left-over'" onmouseout="this.className='tab-left tab-left-disabled'">
                    </div>
                    <div style="width: 8000px;" class="tab-strip-wrap">
                        <ul class="tab-strip" style="float: left;">
                            <li id="iFrameTab1" class="current"><a href="javascript:"><span id="frameTabTitle">我的工作台</span><a
                                class="closeTab"><img border="0" src="/App_Themes/AdminDefaultTheme/images/tab-close.gif" /></a></a>
                            </li>
                            <li id="newFrameTab"><a title="新建标签页" href="javascript:" /></a> </li>
                        </ul>
                    </div>
                </div>
                <!-- 书签结束 -->
                <div id="main_right_frame">
                    <iframe tabid="1" frameborder="0" id="main_right" name="main_right" scrolling="yes"
                        src="Profile/MyWorktable.aspx" onload="SetTabTitle(this)" style="width: 1280px;
                        height: 800px; visibility: inherit; z-index: 2; overflow-x: hidden;"></iframe>
                    <div class="clearbox2" />
                </div>
            </td>
        </tr>
    </table>
    <div style="display: none" id="iframeGuideTemplate">
        <iframe tabid="0" frameborder="0" scrolling="auto" src="about:blank" style="width: 195px;
            height: 800px; visibility: inherit; z-index: 2;"></iframe>
    </div>
    <div style="display: none" id="iframeMainTemplate">
        <iframe tabid="0" frameborder="0" scrolling="yes" src="about:blank" onload="SetTabTitle(this)"
            style="width: 1280px; height: 800px; visibility: inherit; z-index: 2; overflow-x: hidden;">
        </iframe>
    </div>
    </form>
    <%--<div id="showPop" class="popupTips" title="提示窗口">
        <iframe id="iframe_ShowPop" width="100%" frameborder="0" height="0" scrolling="no"
            marginheight="0" marginwidth="0" style="position: absolute; top: 0px; z-index: -1;
            margin: 0px; padding: 0px; border-style: none;"></iframe>
        <dl>
            <dt><a href="javascript:" onclick="javascript:ClosePop();" title="不再提示" class="tips_close">
            </a><a href="javascript:" onclick="javascript:$('#showPop').hide('slow');" title="隐藏"
                class="tips_fold"></a>温馨提示 </dt>
            <dd id="info">
            </dd>
        </dl>
    </div>
    <div id="HelpTips" class="HelpTips" title="帮助窗口">
        <div id="HelpTitle" class="HelpTitle">
            <a href="javascript:" onclick="javascript:dosomething();" title="不再提示" class="tips_close">
            </a><span id="LblHelpTitle">详细教程</span>
        </div>
        <div id="HelpInfo" class="HelpInfo">
            <img src="/Manage/Images/loading.gif" alt="正在载入......" />
        </div>
        <div id="HelpTipsb" class="HelpTipsb">
            <input name="HelpShowFalse" type="checkbox" value="true" onclick="javascript:HelpShowCheck();" />以后不再显示
            <span><a href="javascript:" onclick="$('#ly').click();HelpQuicklyShow();" style="color: #FF0000;
                position: absolute; right: 2px;">快速上手....</a></span>
        </div>
    </div>
    <div id="ly" style="position: absolute; top: 0px; filter: alpha(opacity=60); opacity: 0.5;
        background-color: #777; z-index: 1000; left: 0px; display: none;">
        <iframe id="ifly" name="ifly" src="" frameborder="0" width="100%" height="100%" scrolling="no"
            marginheight="0" marginwidth="0" style="z-index: 999; filter: chroma(color=#ffffff);">
        </iframe>
    </div>
    <div id="HelpQuickly" class="HelpTips" title="快速上手">
        <div id="QuicklyTitle" class="HelpTitle">
            <a href="javascript:" onclick="javascript:$('#ly').click();" title="不再提示" class="tips_close">
            </a><span>快速上手</span>
        </div>
        <div id="QuicklyInfo" class="QuicklyInfo">
            <img src="/Manage/Images/loading.gif" alt="正在载入......" />
        </div>
        <div id="QuicklyTipsb" class="HelpTipsb">
        </div>
    </div>
    <div id="Memorandum" class="HelpTips" title="备忘录">
        <div id="MemorandumTitle" class="HelpTitle">
            <a href="javascript:" onclick="javascript:$('#ly').click();" title="关闭" class="tips_close">
            </a><span>备忘录</span>
        </div>
        <div id="MemorandumInfo" class="HelpInfo" height="350px">
            <iframe id="IframeMemorandum" src="Profile/Memorandum.aspx" marginheight="0" marginwidth="0"
                frameborder="0" width="455" height="225" scrolling="no"></iframe>
            <br />
            注：在你修改了备注的内容后将会自动保存。
        </div>
    </div>--%>

    <script type="text/javascript">
        //移动窗口部份
//        var posX, posY, fdiv;

//        document.getElementById("HelpTitle").onmousedown = moveFloatingDiv;
//        document.getElementById("MemorandumTitle").onmousedown = moveFloatingDiv;
//        document.getElementById("QuicklyTitle").onmousedown = moveFloatingDiv;
//        function moveFloatingDiv(e) {
//            if (!e) e = window.event;  //如果是IE
//            fdiv = this.parentNode;
//            posX = e.clientX - parseInt(fdiv.style.left);
//            posY = e.clientY - parseInt(fdiv.style.top);
//            document.onmousemove = mousemove;
//        }

//        document.onmouseup = function() {
//            document.onmousemove = null;
//        }

//        function mousemove(ev) {
//            if (ev == null) ev = window.event; //如果是IE
//            fdiv.style.left = (ev.clientX - posX) + "px";
//            fdiv.style.top = (ev.clientY - posY) + "px";
//        }


        //写入Cookie
        function setCookie(name, value, expires, path, domain, secure) {
            var today = new Date();
            today.setTime(today.getTime());
            if (expires) {
                expires = expires * 1000 * 60 * 60 * 24;
            }
            var expires_date = new Date(today.getTime() + (expires)); document.cookie = name + '=' + escape(value) + ((expires) ? ';expires=' + expires_date.toGMTString() : '') + ((path) ? ';path=' + path : '') + ((domain) ? ';domain=' + domain : '') + ((secure) ? ';secure' : '');
        }

        //得到Cookie
        function getCookie(name) {
            if (document.cookie.length > 0) {
                cookieStart = document.cookie.indexOf(name + "=")
                if (cookieStart != -1) {
                    cookieStart = cookieStart + name.length + 1
                    cookieEnd = document.cookie.indexOf(";", cookieStart)
                    if (cookieEnd == -1) cookieEnd = document.cookie.length
                    return unescape(document.cookie.substring(cookieStart, cookieEnd))
                }
            }
            return ""
        }

        //类哈希表保存边侧栏状态
        function Hashtable() {
            this._hash = new Object();
            this.add = function(key, value) {
                if (typeof (key) != "undefined") {
                    if (this.contains(key) == false) {
                        this._hash[key] = typeof (value) == "undefined" ? null : value;
                        return true;
                    } else {
                        return false;
                    }
                } else {
                    return false;
                }
            }
            this.remove = function(key) { delete this._hash[key]; }
            this.count = function() { var i = 0; for (var k in this._hash) { i++; } return i; }
            this.items = function(key) { return this._hash[key]; }
            this.contains = function(key) { return typeof (this._hash[key]) != "undefined"; }
            this.clear = function() { for (var k in this._hash) { delete this._hash[k]; } }
            this.tostring = function() { var output = ""; for (var k in this._hash) { if (output) output += "&"; output += k + ":" + this._hash[k]; } return output; }
        }

        var _hashtable = new Hashtable();
        function ToHashtable(string) {
            var _hashdate = string.split("&");
            for (var _kv in _hashdate) {
                kv = _hashdate[_kv].split(":");
                _hashtable.add(kv[0], kv[1]);
            }
        }

        function createSideBarCookie() {
            var key = document.getElementById("left").src.substring(document.getElementById("left").src.lastIndexOf('/') + 1, document.getElementById("left").src.lastIndexOf('.'));
            var value = "";
            if (document.getElementById("frmTitle")) {
                if (document.getElementById("frmTitle").style.display == "") {
                    value = "block";
                }
                else {
                    value = document.getElementById("frmTitle").style.display;
                }
            }
            var sideBarCookie = getCookie("PE_SideBarCookie");
            if (value) {
                ToHashtable(sideBarCookie);
                _hashtable.remove(key, value);
                _hashtable.add(key, value);
                setCookie("PE_SideBarCookie", _hashtable.tostring(), 300, "/", "", false);
            }
        }

        function initSideBarState() {
            var sideBarCooke = getCookie("PE_SideBarCookie");
            var key = document.getElementById("left").src.substring(document.getElementById("left").src.lastIndexOf('/') + 1, document.getElementById("left").src.lastIndexOf('.'));
            if (sideBarCooke && key) {
                _hashtable.clear;
                ToHashtable(sideBarCooke);
                if (_hashtable.contains(key)) {
                    changeSideBarState(_hashtable.items(key));
                }
            }
            else {
                var obj = document.getElementById("switchPoint");
                obj.alt = "关闭左栏";
                obj.src = "/App_Themes/AdminDefaultTheme/Images/butClose.gif";
                document.getElementById("frmTitle").style.display = "block";
                onload();
            }
        }

        function changeSideBarState(state) {
            var obj = document.getElementById("switchPoint");
            if (state == "none") {
                obj.alt = "打开左栏";
                obj.src = "/App_Themes/AdminDefaultTheme/Images/butOpen.gif";
                document.getElementById("frmTitle").style.display = "none";
                var width, height;
                width = document.body.clientWidth - 12;
                height = document.body.clientHeight - 100;
                document.getElementById("main_right").style.height = height;
                document.getElementById("main_right").style.width = width;
                document.getElementById("FrameTabs").style.width = width;
                if (CheckFramesScroll) { CheckFramesScroll(); }
            }
            else {
                obj.alt = "关闭左栏";
                obj.src = "/App_Themes/AdminDefaultTheme/Images/butClose.gif";
                document.getElementById("frmTitle").style.display = "block";
                onload();
            }
        }
    </script>

</body>
</html>
